# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-python-socketio
_pkgname=python-socketio
pkgver=4.3.1
pkgrel=2
pkgdesc='Socket.IO server'
url='https://pypi.org/project/python-socketio/#files'
arch=('any')
license=('MIT')
depends=('python2' 'python2-six' 'python2-python-engineio')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('0e23d26acad27f402fa38348ea4f8b6cdcf3c679d5e0ba0c7b08897eb51fd452714d716b5cd81c601012c3e5a9f2a0468762875bdaecac2a8d408be50a929ee6')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" -O1 --prefix=/usr --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

